import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css';
import '../src/assets/reset.css';
import axios from 'axios'
import VueAxios from 'vue-axios'
import * as echarts from 'echarts';
import 'dayjs/locale/zh-cn'
import locale from 'element-plus/lib/locale/lang/zh-cn'

// import MintUI from 'mint-ui'
// import 'mint-ui/lib/style.css'
axios.defaults.baseURL = '/api'//配置BaseUrl   配置数据所在服务器的前缀（即固定部分）

axios.interceptors.request.use(config=>{
    config.headers.token=window.sessionStorage.getItem('access_token')
    return config
}) 

// createApp(App).use(ElementPlus).use(router).use(VueAxios,axios).mount('#app')
const app = createApp(App)
app.use(ElementPlus,{locale})
app.use(router)
app.use(VueAxios,axios)
app.use(echarts)
app.mount('#app')
